<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title>找回密码-${setting.name}</title>
		[#include "common/include.ftl"]
		<link rel="stylesheet" href="${base}/resource/plug/buttons/buttons.css">
		<link rel="stylesheet" href="${base}/resource/css/register.css">
		<script src="${base}/resource/js/jquery.validate.min.js"></script>
		<script src="${base}/resource/js/password.js"></script>
	</head>
	<body class="customer">
		<div class="top w1">
			[#include "/common/header-top.ftl"/]
			<div class="top-search w">
				<div id="header-logo" class="text-log">
					<div class="t-log">
						<a href="${base}/index.jhtml">
							<img src="[@Pic pic=setting.logo/]" width="200" height="60">
						</a>
					</div>
					<div class="t-text">
						忘记密码
					</div>
				</div>
			</div>
		</div>
		<div id="F-pwd">
			<div class="F-wrap">
				<h2>找回密码</h2>

				<div class="step">
					<div class="step-bg step3"></div>
					<div class="step-tit">
						<ul>
							<li class="t1">
								填写账户名
							</li>
							<li class="t2">
								验证身份
							</li>
							<li class="t3 current">
								重置密码
							</li>
							<li class="t4">
								完成
							</li>
						</ul>
					</div>
					<form action="${base}/forget/reset.jhtml" id="F-form" method="post">
						<input type="hidden" name="token" value="${token}"/>
						<div id="form-groups-list">
							<dl>
								<dt>
									设置密码:
								</dt>
								<dd>
									<input type="password" id="password" name="password" placeholder="6-20个大小写英文字母，符号或数字" />
									<p class="err-msg"></p>
								</dd>
							</dl>
							<dl>
								<dt>
									确认密码:
								</dt>
								<dd>
									<input type="password" name="confirmPwd" class="{equalTo:'#password'}" placeholder="再次输入密码"/>
									<p class="err-msg"></p>
								</dd>
							</dl>
							<dl class="step-btn">
								<dt>
									&nbsp;
								</dt>
								<dd>
									<button class="button button-caution">
										下一步
									</button>
								</dd>
							</dl>
						</div>
					</form>
				</div>
			</div>
			[#include "common/footer-simple.ftl"]
		</div>
	</body>

	<script type="text/javascript">
		var error = '${error}';
		if ($.trim(error) != '') {
			oDialog.prompt(error, 2000);
		}

		(function() {
			$(function() {
				jQuery.validator.addMethod("pass", function(value, element) {
					var result = checkPassword(value);
					return this.optional(element) || result.success;
				}, "6-20个字符，由字母、数字和符号的两种以上组合");

				var rules;
				rules = {
					rules : {
						password : {
							required : true,
							pass : true
						},
						confirmPwd : {
							required : true,
							equalTo : "#password"
						}
					},
					messages : {
						password : {
							required : "请输入密码"
						},
						confirmPwd : {
							required : "请再次输入密码",
							equalTo : "两次密码不一致"
						}
					},
					errorPlacement : function(error, element) {
						return error.appendTo(element.parent().find('.err-msg'));
					}
				};
				return $('#F-form').validate(rules);
			});
		}).call(this);
	</script>
</html>